package com.shop.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.HashSet;
import java.util.Set;

@Data
@TableName("permission")
@ApiModel("Permission对象")
public class Permission implements Serializable {
    @TableId(value = "id",type = IdType.AUTO)
    @ApiModelProperty(value = "权限id",required = true,example = "0")
    private Integer id;

    @TableField("name")
    @ApiModelProperty("权限名称")
    private String name;

    @TableField("keyword")
    @ApiModelProperty("权限密码")
    private String keyword;

    @TableField("discription")
    @ApiModelProperty("权限描述")
    private String discription;

    @TableField(exist = false)
    @ApiModelProperty("角色集合")
    private Set<Role> roles = new HashSet<Role>(0);
}
